package com.woniuxy.stage3demo.service.servicehpd.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.woniuxy.stage3demo.bean.hpd.ProductCheckLogBean;
import com.woniuxy.stage3demo.mapper.mapperhpd.ProductCheckLogMapper;
import com.woniuxy.stage3demo.pageHelper.PageRequest;
import com.woniuxy.stage3demo.service.servicehpd.IProductCheckLogService;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;
import java.util.List;

@Transactional(readOnly = true)
@Service
public class ProductCheckLogServiceImpl implements IProductCheckLogService {
    @Resource
    private ProductCheckLogMapper productCheckLogMapper;


    @Override
    public List<ProductCheckLogBean> findAllCheckResult(Long productId) {
        return productCheckLogMapper.findAllCheckResult(productId);
    }

    @Transactional(isolation = Isolation.REPEATABLE_READ,rollbackFor = Exception.class)
    @Override
    public int addProductCheckLog(ProductCheckLogBean productCheckLogBean) {
        return productCheckLogMapper.addProductCheckLog(productCheckLogBean);
    }

}
